{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "]---\n",
    "description: How to Contribute Back to the Avalanche Community\n",
    "---\n",
    "\n",
    "# Contribute to Avalanche\n",
    "\n",
    "The last step towards becoming a **real continual learning super-hero** ⚡ is to fall into a _radioactive dump_.☢️ Just kidding, it's much easier than that: you need to contribute back to _Avalanche_!\n",
    "\n",
    "There are no _superheroes_ that are not altruistic!\n",
    "\n",
    "{% hint style=\"info\" %}\n",
    "In order to contribute to _Avalanche_, first of all you need to become familiar with all its features and the codebase structure, so if you have not followed the _\"From Zero to Hero Tutorial\"_ from the beginning we suggest to do it before starting to make changes.\n",
    "{% endhint %}\n",
    "\n",
    "First of all, [install _Avalanche_ in \"_Developer Mode\"_](https://avalanche.continualai.org/getting-started/how-to-install#developer-mode-install) _if you haven't already._ After you've familiarized with the _Avalanche_ codebase you have two roads ahead of you:\n",
    "\n",
    "1. You can start working on a [open issue](https://avalanche.continualai.org/questions-and-issues/add-your-issue) \\(we have dozen of them!\\)\n",
    "2. You can [submit a feature-request](https://avalanche.continualai.org/questions-and-issues/request-a-feature) and propose yourself to work on it.\n",
    "\n",
    "<div>\n",
    "<img src=\"../../.gitbook/assets/issues.png\" width=\"1200\" alt=\"Examples of Avalanche Issues available on GitHub\"/>\n",
    "</div>\n",
    "\n",
    "**In any of the two cases you'd need to follow the steps below**:\n",
    "\n",
    "1. [Join our Slack](https://join.slack.com/t/continualai/shared_invite/enQtNjQxNDYwMzkxNzk0LTBhYjg2MjM0YTM2OWRkNDYzOGE0ZTIzNDQ0ZGMzNDE3ZGUxNTZmNmM1YzJiYzgwMTkyZDQxYTlkMTI3NzZkNjU) and **\\#avalanche-dev** channel \\(optional but recommended\\)\n",
    "2. ⭐_Star_ + 👁️_watch_ the repository.\n",
    "3. Fork the repository.\n",
    "4. Create or assign an existing issue/feature to yourself.\n",
    "5. Make your changes.\n",
    "6. Make a [Pull Request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests) \\(PR\\).\n",
    "\n",
    "**The following rules should be respected:**\n",
    "\n",
    "* Use [*Black*](https://github.com/psf/black) code formatting for a consistent coding style, which also handles line lengths (the 88 columns limit) automatically.\n",
    "* Always pull before pushing a commit.\n",
    "* Try to assign to yourself one issue at a time.\n",
    "* Try closing an issue **within roughly 7 days**. If you are not able to do that, please break it down into multiple ones you can tackle more easily, or you can always remove your assignment to the issue!\n",
    "* If you add a new feature, please include also a _test_ and a usage example in your PR.\n",
    "\n",
    "Also, before making your PR, first run the following command for code formatting with *Black*:\n",
    "``` bash\n",
    "black .\n",
    "```\n",
    "\n",
    "then, **make sure** that the following command returns no test errors:\n",
    "```bash\n",
    "python -m unittest discover tests -v\n",
    "```\n",
    "\n",
    "Otherwise fix them and run these commands again until everything is working correctly. You should also check if everything is working on GPUs, using the env variable `USE_GPU=True`:\n",
    "\n",
    "```bash\n",
    "USE_GPU=True python -m unittest discover tests -v\n",
    "```\n",
    "\n",
    "Faster integrity checks can be run with the env variable `FAST_TEST=True` :\n",
    "\n",
    "```bash\n",
    "USE_GPU=False FAST_TEST=True python -m unittest discover tests -v\n",
    "```\n",
    "\n",
    "**Contribute to the Avalanche documentation**\n",
    "\n",
    "Apart from the code, you can also contribute to the Avalanche documentation 📚!  We use [Jupyter notebooks](https://jupyter.org/) to write the documentation, so both code and text can be smoothly inserted, and, as you may have noticed, all our documentation can be run on [Google Colab](https://colab.research.google.com/notebooks/intro.ipynb)! \n",
    "\n",
    "To contribute to the documentation you need to follow the steps below:\n",
    "\n",
    "1. The notebooks are contained in the folder `notebooks`. The folder structure is specular to the documentation, so do not create or delete any folder. \n",
    "2. Detect the notebook that you want to edit and do all the modifications 📝 \n",
    "3. Commit the changes and open a pull request (PR). \n",
    "4. If your pull request will be accepted, your edited notebooks will be automatically converted and uploaded to the official Avalanche website 🎊! \n",
    "\n",
    "\n",
    "\n",
    "## 🤝 Run it on Google Colab\n",
    "\n",
    "You can run _this chapter_ and play with it on Google Colaboratory:\n",
    "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ContinualAI/avalanche/blob/master/notebooks/from-zero-to-hero-tutorial/09_contribute-to-avalanche.ipynb)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
